package com.allenblog.service;

import com.allenblog.domain.ResponseResult;
import com.allenblog.domain.dto.AddArticleDto;
import com.allenblog.domain.dto.ArticleDto;
import com.allenblog.domain.entity.Article;
import com.allenblog.domain.vo.ArticleByIdVo;
import com.allenblog.domain.vo.PageVo;
import com.baomidou.mybatisplus.extension.service.IService;

public interface ArticleService extends IService<Article> {

    /**
     * 热门文章列表
     * @return
     */
    ResponseResult hostArticleList();

    /**
     * 分页查询文章列表
     * @param pageNum
     * @param pageSize
     * @param categoryId
     * @return
     */
    ResponseResult articleList(Integer pageNum, Integer pageSize, Long categoryId);

    /**
     * 文章详情接口
     * @param id
     * @return
     */
    ResponseResult getArticleDetail(Long id);

    ResponseResult updateViewCount(Long id);

    ResponseResult add(AddArticleDto articleDto);

    PageVo selectArticlePage(Article article, Integer pageNum, Integer pageSize);

    ArticleByIdVo getInfo(Long id);

    void edit(ArticleDto article);
}
